/**
 * 
 */
package neptune.manager.model.template;

import java.util.ArrayList;

import neptune.manager.model.topology.OperativeSystem;
import neptune.manager.model.topology.Software;

/**
 * Rappresenta un VmTemplate
 * 
 * @author Roberto Bifulco [RobertoBifulco.it] [info@robertoBifulco.it]
 * 
 */
public class VmTemplate {

	public static enum OsDistributions {
		Debian, CentOS, Fedora
	}

	private String id;
	private OperativeSystem os;
	private ArrayList<Software> sws = new ArrayList<Software>(0);
	private int port;

	/**
	 * @return the port
	 */
	public int getControlPort() {
		return port;
	}

	public VmTemplate() {
		super();
	}

	/**
	 * @return the os
	 */
	public OperativeSystem getOperativeSystem() {
		return os;
	}

	/**
	 * @param os
	 *            the os to set
	 */
	public void setOperativeSystem(OperativeSystem os) {
		this.os = os;
	}

	/**
	 * @return the sws
	 */
	public ArrayList<Software> getSoftwares() {
		return sws;
	}

	/**
	 * @param sws
	 *            the sws to set
	 */
	public void setSoftwares(ArrayList<Software> sws) {
		this.sws = sws;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	public void setControlPort(int port) {
		this.port = port;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Template '" + id + "'= OS:" + os.getName() + "-"
				+ os.getVersion();
	}

}
